/*
 * libCache.h
 *
 *  Created on: 07/06/2012
 *      Author: utnso
 */

#ifndef LIBCACHE_H_
#define LIBCACHE_H_

#include <libmemcached/memcached.h>
#include <libmemcached/types.h>
#include <stdlib.h>
#include "libImprimirPorConsola.h"

#define OBTENER_KEY_GETATTR 1
#define OBTENER_KEY_READDIR 0

void iniciarConexionCache(char*, int32_t);

char* obtenerDatoDeCache(char*, size_t, size_t*, uint32_t*, memcached_return_t*);

memcached_return_t almacenarDatoEnCache(char*, size_t, char*, size_t, time_t, uint32_t);

memcached_return_t borrarDatoDeCache(const char*, size_t, time_t);

char* obtenerKeyBloque(uint32_t numBloque);

#endif /* LIBCACHE_H_ */
